<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
       div{
           font-family: sans-serif;
           text-align: center;
           position: absolute;
           top: 0;
           left: 0;
           right: 0;
           bottom: 0;
           margin: auto;
           display: grid;
           align-items: center;
       }
    </style>
</head>
<body>
    <div>
        <article>
            <h1>欢迎来到后台</h1>
            <h2>现在时间: <span id="TimeNow"></span></h2>
        </article>

    </div>


</body>
</html>
<script src="../js/jquery-3.5.1.js"></script>
<script src="../js/moment.js"></script>
<script>
    moment.locale('zh-cn');
    let timeDiv = document.getElementById('TimeNow')
    timeDiv.innerHTML = moment().format('YYYY年 MM月 DD日 h:mm:ss a');
    setInterval(function (){
        timeDiv.innerHTML = moment().format('YYYY年 MM月 DD日 h:mm:ss a');
    },1000)
</script>